/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.i.kotionokyurievna.jewelry.domain.job;

import ua.i.kotionokyurievna.jewelry.domain.department.Department;

/**
 *
 * @author Kateryna_Reznik
 */
public class Job {
    private int jobId;
    private String jobTitle;
    private double minSalary;
    private double maxSalary;
    private Department department;

    public Job() {
    }

    public Job(String jobTitle, double minSalary, double maxSalary, Department department) {
        this.jobTitle = jobTitle;
        this.minSalary = minSalary;
        this.maxSalary = maxSalary;
        this.department = department;
    }

    public Job(int jobId, String jobTitle, double minSalary, double maxSalary, Department department) {
        this.jobId = jobId;
        this.jobTitle = jobTitle;
        this.minSalary = minSalary;
        this.maxSalary = maxSalary;
        this.department = department;
    }

    public int getJobId() {
        return jobId;
    }

    public void setJobId(int jobId) {
        this.jobId = jobId;
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public double getMinSalary() {
        return minSalary;
    }

    public void setMinSalary(double minSalary) {
        this.minSalary = minSalary;
    }

    public double getMaxSalary() {
        return maxSalary;
    }

    public void setMaxSalary(double maxSalary) {
        this.maxSalary = maxSalary;
    }

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    @Override
    public String toString() {
        return "Job{" + "jobId=" + jobId + ", jobTitle=" + jobTitle + 
                ", minSalary=" + minSalary + ", maxSalary=" + maxSalary + 
                ", department=" + department + '}';
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 97 * hash + (this.jobTitle != null ? this.jobTitle.hashCode() : 0);
        hash = 97 * hash + (this.department != null ? this.department.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Job other = (Job) obj;
        if ((this.jobTitle == null) ? (other.jobTitle != null) : 
                !this.jobTitle.equals(other.jobTitle)) {
            return false;
        }
        if (this.department != other.department && (this.department == null || 
                !this.department.equals(other.department))) {
            return false;
        }
        return true;
    }
    
    
}
